using UnityEngine;
using System.Collections;

public class EnemyCollider : MonoBehaviour {

    private Enemy _enemy;

    void Start()
    {
        _enemy = this.transform.parent.GetComponent<Enemy>();
    }

    //Trap Collider
    void OnTriggerEnter(Collider obj)
    {

        if (obj.gameObject.layer == Const.LAYER_TRAP)
        {
            Const.TRAP_TYPE typeTrap = obj.GetComponent<Trap>().typeTrap;

            switch (typeTrap)
            {
                case Const.TRAP_TYPE.BILLE:
                    _enemy.BilleEffect(obj.GetComponent<Bille>());
                    break;
            }
        }
    }
}
